package cn.zjutleo.village_server.mapper;

import cn.zjutleo.village_server.entity.Department;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Author: 张坤
 * @DateTime: 2021/8/30 22:01
 * @Description: 该类用于 TODO
 */
public interface DepartmentMapper {

    @Select("select * from department where d_village_id = #{d_village_id}")
    @Results(id="Base_department_data",value = {
            @Result(property = "d_id",  column = "d_id",id = true),
            @Result(property = "d_village_id",  column = "d_village_id"),
            @Result(property = "d_name",  column = "d_name"),
            @Result(property = "d_intro",  column = "d_intro"),
            @Result(property = "d_director_id",  column = "d_director_id"),
            @Result(property = "d_address",  column = "d_address"),
    })
    List<Department> searchDepartmentById(Integer d_village_id);
}
